import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect:'/index',
    children:[
      {path: '/user', name: 'user', component: () => import('../views/data/UserView.vue')},
      {path: '/note', name: 'note', component: () => import('../views/user/UserNoteView.vue')},
      {path: '/seeker', name: 'seeker', component: () => import('../views/user/SeekerView.vue')},
      {path: '/submit', name: 'submit', component: () => import('../views/user/UserSubmitView.vue')},
      {path: '/data', name: 'data', component: () => import('../views/data/DataView.vue')},
      {path: '/company', name: 'company', component: () => import('../views/company/CompanyView.vue')},
      {path: '/employee', name: 'employee', component: () => import('../views/company/EmployeeView.vue')},
      {path: '/hr', name: 'hr', component: () => import('../views/company/HrView.vue')},
      {path: '/content', name: 'content', component: () => import('../views/communication/ContentView.vue')},
      {path: '/index', name: 'index', component: () => import('../views/IndexView.vue')},
      {path: '/approvalCompany', name: 'approvalCompany', component: () => import('../views/approval/ApprovalCompany.vue')},
      ]
  },
  {path: '/login', name: 'login', component: () => import('../views/ManagerLogin.vue')},
  {path: '/Ccompany', name: 'Ccompany', component: () => import('../views/CompanyByOneself/CompanyView.vue')},
  {path: '/Cemployee', name: 'Cemployee', component: () => import('../views/CompanyByOneself/EmployeeView.vue')},
  {path: '/Chr', name: 'Chr', component: () => import('../views/CompanyByOneself/HrView.vue')},
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
